import api from './api';

export const reviewService = {
    // 获取任务的评价
    getReviewByTask: (taskId) => {
        return api.get(`/api/reviews/task/${taskId}`);
    },

    // 创建任务的评价
    createReview: (taskId, reviewData) => {
        return api.post(`/api/reviews/task/${taskId}`, reviewData);
    },

    // 在 reviewService.js 中添加
    updateReview: (reviewId, reviewData) => {
        return api.put(`/api/reviews/${reviewId}`, reviewData);
    }
};
